<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page language="java" import="java.sql.*"%>
<%@ page import="packaging.*"%>
<%
	//为取出的值设置中文编码
	request.setCharacterEncoding("utf-8");
	String p_id = request.getParameter("p_id");	
	String p_name = request.getParameter("p_name");
	String p_oldprice = request.getParameter("p_oldprice");
	String p_newprice = request.getParameter("p_newprice");
	String sql = "update imp set p_id=?,p_name=?,p_oldprice=?,p_newprice=? where p_id=?";
	check db = new check();
	Object[] param = {p_id,p_name,p_oldprice,p_newprice,p_id} ;
	 db.doUpdate(sql,param);
	
	response.sendRedirect("index.jsp");
%>

